<script setup>
import { ref,reactive,computed,watch,watchEffect } from "vue";
import itemMenu from "./itemMenu.vue"
const props=defineProps({
	route:Object,
	path:String
})
</script>

<template>
	<template v-if="props.route.meta.hide===true">
		<el-sub-menu :index="(props.path||'')+'/'+props.route.name" v-if="props.route.children">
			<template #title>
				<el-icon v-if="props.route.meta.icon"><component :is="props.route.meta.icon"></component></el-icon>{{props.route.meta.title}}
			</template>
			<itemMenu :path="props.route.path||''" :route="item" v-for="item in props.route.children" :key="item.path"></itemMenu>
		</el-sub-menu>
		<el-menu-item :index="(props.path||'')+'/'+props.route.name" v-else>
			<template #title>
				<el-icon v-if="props.route.meta.icon"><component :is="props.route.meta.icon"></component></el-icon>{{props.route.meta.title}}
			</template>
		</el-menu-item>

	</template>
</template>

<style>


</style>